package beans;

import java.util.Hashtable;

/**
 * Keeps track of the information for this customer, including
 * name, address, and shopping cart.
 *
 * @author dale
 */
public class Customer {
    /** Customer name */
    private static String name;
    /** Customer address */
    private static String address;
    /** Use a hash table so that changes in quanities will replace old quantities */
    static Hashtable<Integer,Float> cartItems;

    public Customer() {
        cartItems  = new Hashtable<Integer,Float>();
    }

    public static void addToCart(int inventoryCode, float quantity) {
        cartItems.put(inventoryCode, quantity);
    }

    public static Hashtable<Integer,Float> getCartItems() {
        return cartItems;
    }

    /**
     * @return the name
     */
    public static String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the address
     */
    public static String getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }

}